]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: handle reloading broken extensions
authorEmilio Pozuelo Monfort <pochu27@gmail.com>
Tue, 25 Apr 2017 15:27:42 +0000 (17:27 +0200)
committerEmilio Pozuelo Monfort <pochu27@gmail.com>
Tue, 25 Apr 2017 15:47:08 +0000 (17:47 +0200)
Some extensions out there may fail to reload. When that happens,
we need to catch any exceptions so that we don't leave things in
a broken state that could lead to leaving extensions enabled in
the screen shield.

https://bugzilla.gnome.org/show_bug.cgi?id=781728

js/ui/extensionSystem.js

index a4dc29eeab7efd6929bc9751b364376ecd91d2be..fc352b895add637c0797efd02f8e392847db9d80 100644 (file)
@@ -282,12 +282,20 @@ function _onVersionValidationChanged() {
     // temporarily disable them all
     enabledExtensions = [];
     for (let uuid in ExtensionUtils.extensions)
-        reloadExtension(ExtensionUtils.extensions[uuid]);
+        try {
+            reloadExtension(ExtensionUtils.extensions[uuid]);
+        } catch(e) {
+            logExtensionError(uuid, e);
+        }
     enabledExtensions = getEnabledExtensions();
 
     if (Main.sessionMode.allowExtensions) {
         enabledExtensions.forEach(function(uuid) {
-            enableExtension(uuid);
+            try {
+                enableExtension(uuid);
+            } catch(e) {
+                logExtensionError(uuid, e);
+            }
         });
     }
 }